num = 0  # 输入一个数字
while not num == 66:
    num = int(input("输入一个数字:"))  # 输入一个数字
    if num > 66:
        print("输入的数字过大")
    elif num < 66:
        print("输入的数字过小")
print("输入正确")

# 输出1到100的所有整数
num = 0
while num < 100:
    num = num + 1
    print(num)

# 输出一到十 除了七以外的整数
num = 0
while num < 10:
    num = num + 1
    if not num == 7:
        print(num)

num = 0
while num < 10:
    num = num + 1
    if num == 7:
        pass
    else:
        print(num)

# 输出1-100所有奇数
num = 0
while num < 100:
    num = num + 1
    if num % 2 == 1:
        print(num)

# 输出1-100所有偶数
num = 0
while num < 100:
    num = num + 1
    if num % 2 == 0:
        print(num)

# 输入1到100的和
num = 0
all_num = 0
while num < 100:
    num = num + 1
    all_num = num + all_num
print(all_num)

# 输出10到1的整数
num = 10
while num > 0:
    print(num)
    num = num - 1

# 练习题 1到100 1-2+3-4.....+100
num = 0
all_num = 0
while num < 100:
    num = num +1
    if num % 2 == 1:
        all_num = all_num + num
    else:
        all_num = all_num - num
print(all_num)
